<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<html>
<head>
<title>FINIAC | Finanace Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<script language="JavaScript" src="../html/calendar_us.js"></script>
	<link rel="stylesheet" href="../html/calendar.css">
<link href="../css/styles.css" rel="stylesheet" type="text/css">


<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>

<body>
<form name="dailySummary" action="monthlyAccountSummary.htm" method="get">


<table width="99%" border="0">
  
  <tr>
    <td><span class="heading"><span class="Bredcrumbs">Account Summary&gt;&gt; Daily &gt;&gt;</span></span></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="9"><img src="../images/Tright_03_01.gif" width="9" height="29"></td>
        <td background="../images/Tcenter.gif" class="heading_white" >Monthly Account Summary  <%= request.getParameter("month") %> - <%= request.getParameter("year") %></td>
        <td width="10" ><img src="../images/Tright_1_01.gif" width="9" height="29"></td>
      </tr>
      <tr>
        <td height="19" valign="top" background="../images/Tright_03_03.gif"></td>
        <td class="heading"><div align="right"> <span class='mandatoryfield'>* Mandatory Fields</span></div></td>
        <td valign="top" background="../images/Tright_3_3.gif" ></td>
      </tr>
      <tr>
        <td valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td ><img src="../images/01.gif" width="5" height="5" /></td>
            <td width="914" background="../images/02.gif"></td>
            <td><img src="../images/03.gif" width="5" height="5" /></td>
          </tr>
          <tr>
            <td width="5"  background="../images/left.gif"></td>
            <td valign="top"><table width="100%" cellspacing="1" cellpadding="2">
                
              	<tr>

							<td width="13%" height="25" class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Select Month : </div>
							</td>
							<td width="33%" height="25" class="row-even"><span
								class="star">
							  <select name="month">
							<option value="01">January</option>
							<option value="02">February</option>
							<option value="03">March</option>
							<option value="04">April</option>
							<option value="05">May</option>
							<option value="06">June</option>
							<option value="07">July</option>
							<option value="08">August</option>
							<option value="09">September</option>
							<option value="10">October</option>
							<option value="11">November</option>
							<option value="12">December</option>
					  </select>
							</span></td>
							<td width="15%" class="row-odd">
							<div align="right"><span class="Mandatory">*</span> Year : </div>
							</td>

							<td width="39%" class="row-even"><input type="text" id="year" class="row-white"  name="year"/>
							</td>
						</tr>
              </table>
             
              </td>
            <td width="5" height="30"  background="../images/right.gif"></td>
          </tr>
          <tr>
            <td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
            <td background="../images/05.gif"></td>
            <td><img src="../images/06.gif" /></td>
          </tr>
        </table></td>
        <td valign="top" background="../images/Tright_3_3.gif" ></td>
      </tr>
      <tr>
        <td height="19" valign="top" background="../images/Tright_03_03.gif"></td>
        <td class="heading"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="49%" height="35" align="right"><input name="Submit2" type="submit" class="formbutton" value="Continue" /></td>
            <td width="2%" height="35" align="center">&nbsp;</td>
            <td width="49%" height="35" align="left"><input name="Submit2" type="reset" class="formbutton" value="Reset" /></td>
          </tr>
        </table></td>
        <td valign="top" background="../images/Tright_3_3.gif" ></td>
      </tr>
     
</table>



<!--  End of select date form -->  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
  

      
      <tr>
        <td height="75" valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" class="news"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td ><img src="../images/01.gif" width="5" height="5" /></td>
            <td width="914" background="../images/02.gif"></td>
            <td><img src="../images/03.gif" width="5" height="5" /></td>
          </tr>
          <tr>
            <td width="5"  background="../images/left.gif"></td>
            <td valign="top"><table width="100%" cellspacing="1" cellpadding="2">
            <c:choose>
			<c:when test="${items.isEmpty() }"><h2>No Entry Found !! Select another month and year.</h2></c:when>
            <c:otherwise>
              <tr >
                <td width="5%" height="25" class="row-odd" align="center">Sl. No.</td>
                <td height="25" class="row-odd" align="center" style="width: 27%">Item</td>
                <td class="row-odd" align="center" style="width: 13%">Number of items</td>
              <td width="10%" class="row-odd" align="center">Selling Price</td>
                <td width="15%" class="row-odd" align="center">Sale Amount</td>
                </tr>
            <c:forEach items="${items}" var="sales" varStatus="status">
								<tr id="record" class="<c:if test="${status.count % 2 == 0}">row-white</c:if><c:if test="${status.count % 2 == 1}">row-even</c:if>">
									
									<td  align="center" height="25">${status.count }</td>
									<td  align="center" style="width: 27%">${sales.productId.product}</td>							
									<td  align="center"  style="width: 10%">${sales.qtySold}</td>
									<td  align="center" style="width: 15%">${sales.productId.sellingPrice}</td>
									<c:set var="Test" value="${sales.total+Test}" scope="page"/>
									

									<td  align="center" style="width: 15%">${sales.total}</td>
										
								</tr>
						</c:forEach>
								<tr>
										<td class="row-odd" height="30"> </td>
										<td class="row-odd"> </td>
										<td class="row-odd"> </td>
										
										<td class="row-odd" align="center"> <h2> TOTAL </h2></td>
										<td class="row-odd" align="center"><h2><c:out value="${Test}" />
								</h2> </td></tr>
			</c:otherwise></c:choose>
                
            </table></td>
            <td width="5" height="30"  background="../images/right.gif"></td>
          </tr>
          <tr>
            <td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
            <td background="../images/05.gif"></td>
            <td><img src="../images/06.gif" /></td>
          </tr>
        </table></td>
        <td width="10" valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      
      
      
          
      <tr>
        <td height="10" valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" class="news">&nbsp;</td>
        <td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      <tr>
        <td><img src="../images/Tright_03_05.gif" width="9" height="29"></td>
        <td width="0" background="../images/TcenterD.gif"></td>
        <td><img src="../images/Tright_02.gif" width="9" height="29"></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>